πŸ•ΈοΈ Ada Research Browser

DEPLOYMENT.md
← Back

Deploy Compliance Auditor to Vercel

1. Push code to GitHub

From the ChessTutor repo root (parent of compliance-auditor):

git add .
git commit -m "Compliance Auditor: CMMC Level 2, Coast Guard UI, Audit Log"
git push origin main

If compliance-auditor is a submodule, commit and push from its directory first, then update the parent repo.


2. Import project in Vercel

  1. Go to vercel.com and sign in (GitHub).
  2. Click Add New β†’ Project.
  3. Import your ChessTutor (or compliance-auditor) repository.
  4. Root Directory: set to compliance-auditor (not the repo root).
  5. Framework Preset: Next.js (auto-detected).
  6. Build Command: npm run build (default).
  7. Output Directory: leave default.

3. Environment variables

In Project Settings β†’ Environment Variables, add:

Name Value Environments
NEXT_PUBLIC_SUPABASE_URL Your Supabase project URL Production, Preview, Development
NEXT_PUBLIC_SUPABASE_ANON_KEY Supabase anon key Production, Preview, Development
SUPABASE_SERVICE_ROLE_KEY Supabase service role key Production, Preview, Development
OPENAI_API_KEY Your OpenAI API key Production, Preview, Development
ANTHROPIC_API_KEY Your Anthropic API key Production, Preview, Development

Copy values from .env.local (never commit that file).


4. Supabase Auth redirect URLs

  1. Supabase Dashboard β†’ Authentication β†’ URL Configuration.
  2. Add to Redirect URLs:
  3. https://your-app.vercel.app/**
  4. https://your-app.vercel.app/auth/callback
  5. Replace your-app with your Vercel project name or custom domain.

5. Deploy

cd compliance-auditor
npx vercel

Follow prompts, link the project if needed, then:

npx vercel --prod

6. Post-deploy


Troubleshooting

Issue Fix
Build fails Check Vercel build logs; ensure Root Directory = compliance-auditor.
"Unauthorized" / auth errors Verify env vars and Supabase redirect URLs.
API routes 500 Ensure OPENAI_API_KEY and ANTHROPIC_API_KEY are set in Vercel.